package com.zscat.mallplus.service.impl;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zscat.mallplus.oms.entity.OmsOrder;
import com.zscat.mallplus.oms.entity.OmsOrderItem;
import com.zscat.mallplus.oms.entity.OmsOrderReturnApply;
import com.zscat.mallplus.oms.vo.ExpressInfo;
import com.zscat.mallplus.oms.vo.OrderParam;
import com.zscat.mallplus.oms.vo.PayParam;
import com.zscat.mallplus.oms.vo.TbThanks;
import com.zscat.mallplus.ums.entity.UmsMember;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.vo.ApplyRefundVo;

import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author zscat
 * @since 2019-04-17
 */
public interface IOmsOrderService extends IService<OmsOrder> {



    /**
     * 自动取消超时订单
     */
    @Transactional
    CommonResult cancelTimeOutOrder();



    /**
     * 释放库存和销量
     *
     * @param newE
     */
    void releaseStock(OmsOrder newE);





    /**
     * 订单到期自动发货
     *
     * @return
     */
    CommonResult autoDeliveryOrder();

    /**
     * 订单到期自动评论
     *
     * @return
     */
    CommonResult autoCommentOrder();

    /**
     * 订单到期自动完成
     *
     * @return
     */
    CommonResult autoSucessOrder();

    /**
     *
     * @param orderReturnApply
     */
    void refund(OmsOrderReturnApply orderReturnApply) throws Exception;
}
